{include file="common/common"}
<!-- /Page Sidebar -->
<!-- Page Content -->
<div class="page-content">
    <!-- Page Breadcrumb -->
    <div class="page-breadcrumbs">
        <ul class="breadcrumb">
            <li>
                <a href="#">系统</a>
            </li>
            <li>
                <a href="{:url('lst')}">栏目管理</a>
            </li>
            <li class="active">修改栏目</li>
        </ul>
    </div>
    <!-- /Page Breadcrumb -->

    <!-- Page Body -->
    <div class="page-body">

        <div class="row">
            <div class="col-lg-12 col-sm-12 col-xs-12">
                <div class="widget">
                    <div class="widget-header bordered-bottom bordered-blue">
                        <span class="widget-caption">修改栏目</span>
                    </div>
                    <div class="widget-body">
                        <div id="horizontal-form">
                            <form class="form-horizontal" role="form" action="" method="post">
                                <div class="form-group">
                                    <label for="username" class="col-sm-2 control-label no-padding-right">栏目id</label>
                                    <div class="col-sm-6">
                                        <input class="form-control" placeholder="" name="id" required="" type="text" value="{$cate.id}" disabled ='disabled'>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="username" class="col-sm-2 control-label no-padding-right">栏目名称</label>
                                    <div class="col-sm-6">
                                        <input class="form-control" placeholder="" name="catename" required="" type="text" value="{$cate.catename}">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="username" class="col-sm-2 control-label no-padding-right">关键词</label>
                                    <div class="col-sm-6">
                                        <input class="form-control" placeholder="" name="keywords"  type="text" value="{$cate.keywords}">
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="username" class="col-sm-2 control-label no-padding-right">栏目描述</label>
                                    <div class="col-sm-6">
                                        <textarea name="desc" id="" cols="105" rows="3" >{$cate.desc}
                                        </textarea>
                                    </div>

                                </div>

                                <div class="form-group">
                                    <label for="group_id" class="col-sm-2 control-label no-padding-right">栏目类型</label>
                                    <div class="col-sm-6">

                                        <div class="radio" style="float:left;margin-right: 20px">
                                            <label>
                                                <input class="type" type="radio"  name="type" {if condition="$cate['type'] eq 1"} checked="checked" {/if} value="1">
                                                <span class="text">列表栏目</span>
                                            </label>
                                        </div>
                                        <div class="radio" style="float:left;margin-right: 20px">
                                            <label>
                                                <input type="radio" class="inverted type" name="type" value="2" {if condition="$cate['type'] eq 2"} checked="checked" {/if}>
                                                <span class="text">单页栏目</span>
                                            </label>
                                        </div>
                                        <div class="radio" style="float:left;margin-right: 20px">
                                            <label>
                                                <input type="radio" class="inverted type" name="type" value="3" {if condition="$cate['type'] eq 3"} checked="checked" {/if}>
                                                <span class="text">图片栏目</span>
                                            </label>
                                        </div>
                                    </div>
<!--                                    {eq name="$cate['type']" value="2"}-->

<!--                                    <script>-->
<!--                                        var a = document.getElementsByClassName('type');-->
<!--                                        a[0].removeAttribute("checked");-->
<!--                                        a[1].setAttribute("checked","checked");-->
<!--                                    </script>-->
<!--                                    {/eq}-->
                                </div>
                                <div class="form-group">
                                    <label for="group_id" class="col-sm-2 control-label no-padding-right">是否推荐</label>
                                    <div class="col-sm-6">
                                        <label style="margin-right: 15px">
                                            <input type="radio" value="1" name="rec" {if condition="$cate['rec'] eq 1"}checked="checked"{/if}>
                                            <span class="text">是</span>
                                        </label>
                                        <label style="margin-right: 15px">
                                            <input type="radio" value="0" name="rec" {if condition="$cate['rec'] eq 0"}checked="checked"{/if}">
                                            <span class="text">否</span>
                                        </label>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <label for="username" class="col-sm-2 control-label no-padding-right">上级栏目</label>
                                    <div class="col-sm-6">
                                        <select name="pid" id="">
                                            <option value="0">顶级栏目</option>
                                            {volist name="cateres" id="cateAll"}
                                            <option class="opt" {eq name="$cate['pid']" value="$cateAll['id']"}selected="selected"{/eq} value="{$cateAll.id}">{neq name="$cateAll['level']" value="0"}|{/neq}<?php echo str_repeat('-----',$cateAll['level']);?>{$cateAll.catename}</option>
                                            {/volist}

                                        </select>
                                    </div>
                                    <p class="help-block col-sm-4 red"></p>
                                </div>
                                <div class="form-group">
                                    <label for="username" class="col-sm-2 control-label no-padding-right">栏目内容</label>
                                    <div class="col-sm-6">
                                        <textarea name="content" id="content" cols="105" rows="3">{$cate.content}</textarea>
                                    </div>

                                </div>
                                <div class="form-group">
                                    <div class="col-sm-offset-2 col-sm-10">
                                        <button type="submit" class="btn btn-default">修改栏目</button>
                                    </div>
                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>
        </div>

    </div>
    <!-- /Page Body -->
</div>
<!-- /Page Content -->
<!--Beyond Scripts-->
<script src="__static__/style/beyond.js"></script>
<script>
    UE.getEditor('content',{initialFrameHeight:400})
</script>
</div>
</div>

<!--Basic Scripts-->
<script src="__static__/style/jquery_002.js"></script>
<script src="__static__/style/bootstrap.js"></script>
<script src="__static__/style/jquery.js"></script>
<!--Beyond Scripts-->
<script src="__static__/style/beyond.js"></script>



</body></html>